package com.dating.beetl.funs;

import org.beetl.core.Context;
import org.beetl.core.Function;
import org.nutz.lang.Strings;
import org.nutz.mvc.Mvcs;

/**
 * 
 * @author tovish
 *
 */
public class GlobalFun implements Function {

	@Override
	public Object call(Object[] paras, Context ctx) {
		if (paras == null) {
			return null;
		}
		switch (paras[0].toString()) {
		case "debug":
			//return Strings.equalsIgnoreCase("localhost", Mvcs.getReq().getServerName()) || Strings.equalsIgnoreCase("127.0.0.1", Mvcs.getReq().getServerName());
			return false;
		default:
			return paras;
		}

	}

}
